﻿<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>GD库函数综合使用实例</title>
</head>
<body>
<?php
	$im = imagecreatetruecolor(50, 20);
	$black = imagecolorallocate($im, 0, 0, 0);
	$white = imagecolorallocate($im, 255, 255, 255);
	imagefilledrectangle($im, 0, 0, 49, 19, $white);
	$font = imageloadfont("04b.gdf");
	imagestring($im, $font, 0, 0, "Hello", $black);
	ob_clean();  
	flush();
	imagepng($im);     
	imagedestroy($im);
?>
</body>
</html>